<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>

<style type="text/css">
body {
	background-color:#FFFFFF;
	font-family: Verdana, Arial, Helvetica, sans-serif; 
	font-size: 80%; 
	font-weight: normal
	}
h1,h2,h3,h4 {
	font-family:Arial, Helvetica, sans-serif;
	}
li {
	margin-bottom: 5pt;
	}
.code {
	font-family: "Lucida Console", "Courier New", Courier, monospace;
	}
.hilite {
	background: yellow;
	}
.codehilite {
	font-family: "Lucida Console", "Courier New", Courier, monospace;
	background: yellow;
}
.note {
	background: #33FFFF;
	}
.underline {
	text-decoration: underline;
	}
    .style2
    {
        background-color: #FFFF00;
    }
</style>
<title>Untitled Document</title>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>
<body>
<table width="90%" border="0" cellspacing="4" cellpadding="4">
  <tr>
    <td colspan="2" style="background-color:#CCFFCC">
      <table width="100%" border="0" cellspacing="0" cellpadding="4">
        <tr>
          <td><h2 class="titletext">ASCOM SafetyMonitor Driver (C#)</h2></td>
        </tr>
      </table></td>
  </tr>
  <tr>
    <td style="vertical-align: top">
      	<h4 class="titletext">You have just created the skeleton of an  ASCOM SafetyMonitor driver in C#. It produces an in-process (assembly) based driver.</h4>
      <p class="note">Prior to developing your first driver, please familiarize yourself with the <a href="http://ascom-standards.org/developer.html">developer information we've provided</a> at the ASCOM Initiative web site (internet required). </p>
      <p class="underline">You must do the following in order to complete your implementation:</p>
      <ol>
      	<li><span class="codehilite"> BUILDING!</span> Right click on the project name and 
            select the properties.<br />
            In the Application tab change the assembly name to <span class="codehilite">
            ASCOM.PromptWeather.SafetyMonitor</span>; and the default namespace to 
            <span class="codehilite">ASCOM.PromptWeather</span>. This could not be automated in the template.</li>
      	<li>SafetyMonitor to the Debug configuration and build the template now. It should build without
      		errors.</li>
      	<li>Double-click the <span class="code">Test.js</span> script for a quick check of your driver. It activates only the SetupDialog() method, so it will run after you build the template successfully, even if you haven't yet implemented any of the properties and methods. </li>
      	<li>Open the AssemblyInfo.cs and Driver.cs files, then show the Task List and select Comments. This
      		will show you the places where you need to add or change things for your driver. Tasks include 
      		implementing the required properties and methods. See the ASCOM SafetyMonitor spec.</li>
      	<li>Customize the Setup Dialog (SetupDialogForm) to provide the settings and other controls for
      		your driver.</li>
      	</ol>
      <h3>Notes:</h3>
      <ul>
      	<li>Successfully building the driver, as well as using <span class="code">regasm</span> 
            32 and 64 on the assembly, registers it for both COM and ASCOM (the Chooser). See the code in the ASCOM Registration region of Driver.cs. </li>
      	<li>Doing a Clean for the project, as well doing a <span class="code">regasm -u</span> on the assembly,  unregisters it for both COM and ASCOM (the Chooser).</li>
      	<li>The project's Debug configuration is already configured (<a href="#footnote">note</a>) for driver debugging using the 
      		supplied Test.js script. Place a breakpoint in your driver class constructor, then      	start debugging (go, F5). Your breakpoint will be hit as soon as the test script creates an instance of your driver (after selecting it in the Chooser). You can now single step, examine variables, etc. Please review Test.js and feel free to make changes and additions to activate various parts of your driver during debugging. You can bypass the appearance of the Chooser by removing<br />
      		<br />
      		<span class="code">var F = new ActiveXObject(H.Choose(&quot;&quot;));			// Create instance of selected Driver </span><br />
      		<br />
      		and substituting<br />
      		<br />
      		<span class="code">var F = new ActiveXObject(&quot;ASCOM.PromptWeather.SafetyMonitor&quot;);<br />
      		</span><br />
      		This is a great way to incrementally debug your driver's properties and methods. Create
      		additional scripts in either JScript or VBScript. To change the script that is used to 
      		activate the driver during debugging, open Project Properties, Debug tab, and change
      		the script name in the Command Line Arguments field.</li>
      	</ul>
      <p><a></a>(note) If you're running on Windows 2000, you'll have to change the path to cscript.exe in
      	your project properties, Debug tab, Start External Program. Change c:\windows\ to c:\winnt\.
      	This was unavoidable because VS.NET doesn't support substitution macros in this field.</p></td>
    <td style="text-align: right; vertical-align: top">
      <table width="100%" border="0" cellspacing="0" cellpadding="4">
        <tr>
          <td style="">
            <table width="100%" border="0" cellspacing="0" cellpadding="4">
              <tr>
                <td><h3> ASCOM Initiative</h3></td>
				<td><img src="ASCOM.png" alt="logo" width="48" height="56" longdesc="http://ascom-standards.org/" /></td>
                </tr>
            </table>          </td>
        </tr>
        <tr>
          <td><p>The ASCOM Initiative consists of a group of astronomy software developers and instrument vendors  whose goals are to promote the driver/client model and scripting  automation. </p>
          	<p>See the <a href="http://ascom-standards.org/" target="browser">ASCOM web site</a> for more information. Please participate in the <a href="http://tech.groups.yahoo.com/group/ASCOM-Talk" target="browser">ASCOM-Talk Yahoo Group</a>. </p>
          	</td>
        </tr>
      </table>    </td>
  </tr>
</table>
</body>
</html>
